﻿@{
    ViewBag.Title = "Chat";
    Layout = "~/Views/Shared/ListLayout.cshtml";
}
<div id="cc" class="easyui-layout" data-options="fit:true,border:false">
    <div data-options="region:'west',split:true,title:'组织机构'" style="width: 222px;">
        <ul class="easyui-tree" id="ttOrg" data-options="url:'@Url.Action("GetAllOrganizationsForTree", "Organization", new { area="Auth"})',parentField: 'ParentId'"></ul>
    </div>
    <div data-options="region:'center',split:true,title:'在线用户列表'">
        <table id="dg" class="easyui-datagrid" data-options="title:'用户列表',fitColumns:true,pagination:true,fit:true,idField:'Id',border:false">
            <thead>
                <tr>
                    <th data-options="field:'Id',width:80">Id</th>
                    <th data-options="field:'Name',width:80">用户名</th>
                </tr>
            </thead>
        </table>
    </div>
</div>
@section Script {
    <script src="~/Scripts/jquery.signalR-2.0.2.min.js"></script>
    <script src="~/signalr/hubs"></script>
    <script src="~/Scripts/chatHub.js"></script>
    <script>
        $(function () {
            var name = '@Willow.Authorization.OnlineContext.GetCurrentUser().FullName';
            var orgId = '@Willow.Authorization.OnlineContext.GetCurrentUser().OrganizationId';
            initChat(name, orgId);
        });
    </script>
}
